summaryrefslogtreecommitdiffstats
path: root/src/input_common/helpers/joycon_protocol/calibration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/helpers/joycon_protocol/calibration.cpp')
-rw-r--r--src/input_common/helpers/joycon_protocol/calibration.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/input_common/helpers/joycon_protocol/calibration.cpp b/src/input_common/helpers/joycon_protocol/calibration.cpp
index d8f040f75..69e3379cf 100644
--- a/src/input_common/helpers/joycon_protocol/calibration.cpp
+++ b/src/input_common/helpers/joycon_protocol/calibration.cpp
@@ -129,7 +129,7 @@ DriverResult CalibrationProtocol::GetImuCalibration(MotionCalibration& calibrati
DriverResult CalibrationProtocol::GetRingCalibration(RingCalibration& calibration,
s16 current_value) {
- constexpr s16 DefaultRingRange{800};
+ constexpr static s16 DefaultRingRange{800};
// TODO: Get default calibration form ring itself
if (ring_data_max == 0 && ring_data_min == 0) {
@@ -168,8 +168,8 @@ u16 CalibrationProtocol::GetYAxisCalibrationValue(std::span<u8> block) const {
}
void CalibrationProtocol::ValidateCalibration(JoyStickCalibration& calibration) {
- constexpr u16 DefaultStickCenter{0x800};
- constexpr u16 DefaultStickRange{0x6cc};
+ constexpr static u16 DefaultStickCenter{0x800};
+ constexpr static u16 DefaultStickRange{0x6cc};
calibration.x.center = ValidateValue(calibration.x.center, DefaultStickCenter);
calibration.x.max = ValidateValue(calibration.x.max, DefaultStickRange);
@@ -181,9 +181,9 @@ void CalibrationProtocol::ValidateCalibration(JoyStickCalibration& calibration)
}
void CalibrationProtocol::ValidateCalibration(MotionCalibration& calibration) {
- constexpr s16 DefaultAccelerometerScale{0x4000};
- constexpr s16 DefaultGyroScale{0x3be7};
- constexpr s16 DefaultOffset{0};
+ constexpr static s16 DefaultAccelerometerScale{0x4000};
+ constexpr static s16 DefaultGyroScale{0x3be7};
+ constexpr static s16 DefaultOffset{0};
for (auto& sensor : calibration.accelerometer) {
sensor.scale = ValidateValue(sensor.scale, DefaultAccelerometerScale);